﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using Newtonsoft.Json;
using Easy.BLL;
using Easy.Operation;

namespace Easy.Web.Service.Data
{
    /// <summary>
    /// GetFormPageInfo 的摘要说明
    /// </summary>
    public class GetFormPageInfo : BaseHttpHandler
    {

        public override void ProcessRequest(HttpContext context)
        {
            context.Response.ContentType = "text/plain";

            string FormSet = context.Request.Params["FormSet"] == null ? "AppDefaultForm" : context.Request.Params["FormSet"];
            string Id = context.Request.Params["id"];
            FormDataBLL bll = new FormDataBLL();
            Guid id;
            try
            {
                id = Guid.Parse(Id);
            }
            catch (Exception)
            {
                id = Guid.Empty;
            }
            string JobjectData = bll.GetFormJson(context, FormSet,id , this.GetSystemUser());
            context.Response.Write(JobjectData);
        }

    }
}